package com.haoliang.spring.component.xml.main;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author zhaohaoliang
 * @Date 创建于 上午10:01 2019/3/10
 * @Description 请输入类的描述信息
 */
public class MainContext {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("component-scan.xml");

        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        for (String beanName:beanDefinitionNames){
            System.out.println(beanName);
        }
    }
}
